Computer controlled engine valve operation

ABSTRACT

An electronic valve actuation system and control method is described. The valve timing is changed between early and late intake valve closing depending on engine operating conditions. Further, valve timing is adjusted to control engine airflow or engine torque. Finally, air-fuel ratio is adjusted based on feedback from an exhaust gas oxygen sensor as well as an estimate of air, fuel, and residual exhausted from cylinders operating with late valve closing (after bottom dead center) timing.

BACKGROUND OF THE INVENTION

[0001] Engines of vehicles can operate with an emission control deviceto reduce exhaust emissions. In order to achieve efficient conversion ofexhaust emissions, emission control devices such as catalytic convertersrequire specific exhaust air-fuel ratios. Thus, fuel injection istypically controlled in order to provide a desired exhaust air-fuelratio and thereby improve emission reduction.

[0002] However, the inventors herein have recognize a disadvantage withsystems that transition valve timing between early intake valve closing(EIVC) and late intake valve closing (with valve closing past BDC(bottom dead center) (i.e., in the compression stroke). In particular,the transition between early intake valve closing (EIVC) operation andlate intake valve closing (LIVC) operation can be difficult to manage.

[0003] For example, when the air-fuel charge starts to be pushed backinto the intake manifold from the cylinder in late valve timing (due tocompression from piston motion), the air-to-fuel mixture supplied to thesubsequent cylinders is disturbed. This is because the air-fuel mixtureis pushed back into the intake manifold. Deviations in the exhaustair-fuel ratio occur as a result and there can be a degraded impact oncatalyst performance and tailpipe emissions. In other words, theair-fuel mixture pushed back into the intake manifold changes theair-fuel mixture to be drawn into subsequent cylinder events.

SUMMARY OF THE INVENTION

[0004] The above disadvantages are overcome by an electronicallycontrolled system. The system comprises: a computer storage mediumhaving a computer program encoded therein for controlling fuel injectedinto an internal combustion engine having an intake manifold, saidcomputer storage medium comprising: code for determining an amount of amedium exhausted into said intake manifold from a previous cylinderevent of said engine; and code for adjusting fuel injected for a latercylinder event based on said determined amount of medium.

[0005] In this way, it is possible to transition between early and lateintake valve timing while reducing exhaust air-fuel ratio errors duringthe transition. In other words, by determining medium that is exhaustedinto the intake manifold, it is possible to provide future cylinderswith a more accurate amount of injected fuel, thereby more accuratelymaintaining the overall exhaust gas air-fuel ratio.

[0006] Furthermore, in another aspect of the invention, which determineswhen to transition between early and late intake valve closing, it ispossible to provide a requested amount of engine output, or engineairflow.

BRIEF DESCRIPTION OF THE FIGURES

[0007] The above features, and advantages will be readily apparent fromthe following detailed description of an example embodiment of theinvention when taken in connection with the accompanying drawings.

[0008]FIG. 1 is a block diagram of a vehicle illustrating variouscomponents related to the present invention;

[0009]FIG. 2a show a schematic vertical cross-sectional view of anapparatus for controlling valve actuation, with the valve in the fullyclosed position;

[0010]FIG. 2b shows a schematic vertical cross-sectional view of anapparatus for controlling valve actuation as shown in FIG. 1, with thevalve in the fully open position;

[0011]FIG. 3 is a graph illustration an example of selection criteriafor valve closing timing;

[0012]FIG. 4 shows measured air-to-fuel ratio spikes caused by EIVC toLIVC transitions at 2500 rpm;

[0013]FIGS. 5-6 and 10 are high level flowcharts for use with thepresent invention;

[0014]FIGS. 7-9 show experimental results by operation according tovarious features of example embodiments of present invention;

[0015]FIG. 11A shows a VCT engine;

[0016]FIG. 11B shows an alternative embodiment flow chart;

[0017]FIG. 12A-B show variation of engine volume as a function of crankdegrees and regression approximations; and

[0018]FIG. 13-14 shows experimental test data.

DETAILED DESCRIPTION OF THE INVENTION

[0019] Referring to FIG. 1, internal combustion engine 10 is shown.Engine 10 is an engine of a passenger vehicle or truck driven on roadsby drivers. Engine 10 is coupled to torque converter via crankshaft 13.The torque converter is also coupled to transmission via turbine shaft.The torque converter has a bypass clutch, which can be engaged,disengaged, or partially engaged. When the clutch is either disengagedor partially engaged, the torque converter is said to be in an unlockedstate. The turbine shaft is also known as transmission input shaft. Thetransmission comprises an electronically controlled transmission with aplurality of selectable discrete gear ratios. The transmission alsocomprises various other gears such as, for example, a final drive ratio.The transmission is also coupled to tires via an axle. The tiresinterface the vehicle to the road.

[0020] Internal combustion engine 10 comprising a plurality ofcylinders, one cylinder of which is shown in FIG. 1, is controlled byelectronic engine controller 12. Engine 10 includes combustion chamber30 and cylinder walls 32 with piston 36 positioned therein and connectedto crankshaft 13. Combustion chamber 30 communicates with intakemanifold 44 and exhaust manifold 48 via respective intake valve 52 andexhaust valve 54. Exhaust gas oxygen sensor 16 is coupled to exhaustmanifold 48 of engine 10 upstream of catalytic converter 20. In oneexample, converter 20 is a three-way catalyst for converting emissionsduring operation about stoichiometry.

[0021] As described more fully below with regard to FIGS. 2a and 2 b, atleast one of, and potentially both, of valves 52 and 54 are controlledelectronically via apparatus 210.

[0022] Intake manifold 44 communicates with throttle body 64 viathrottle plate 66. Throttle plate 66 is controlled by electric motor 67,which receives a signal from ETC driver 69. ETC driver 69 receivescontrol signal (DC) from controller 12. In an alternative embodiment, nothrottle is utilized and airflow is controlled solely using valves 52and 54. Further, when throttle 66 is included, it can be used to reduceairflow if valves 52 or 54 become degraded.

[0023] Intake manifold 44 is also shown having fuel injector 68 coupledthereto for delivering fuel in proportion to the pulse width of signal(fpw) from controller 12. Fuel is delivered to fuel injector 68 by aconventional fuel system (not shown) including a fuel tank, fuel pump,and fuel rail (not shown).

[0024] Engine 10 further includes conventional distributorless ignitionsystem 88 to provide ignition spark to combustion chamber 30 via sparkplug 92 in response to controller 12. In the embodiment describedherein, controller 12 is a conventional microcomputer including:microprocessor unit 102, input/output ports 104, electronic memory chip106, which is an electronically programmable memory in this particularexample, random access memory 108, and a conventional data bus.

[0025] Controller 12 receives various signals from sensors coupled toengine 10, in addition to those signals previously discussed, including:measurements of inducted mass air flow (MAF) from mass air flow sensor110 coupled to throttle body 64; engine coolant temperature (ECT) fromtemperature sensor 112 coupled to cooling jacket 114; a measurement ofthrottle position (TP) from throttle position sensor 117 coupled tothrottle plate 66; a measurement of transmission shaft torque, or engineshaft torque from torque sensor 121, a measurement of turbine speed (Wt)from turbine speed sensor 119, where turbine speed measures the speed ofshaft 17, and a profile ignition pickup signal (PIP) from Hall effectsensor 118 coupled to crankshaft 13 indicating an engine speed (N).Alternatively, turbine speed may be determined from vehicle speed andgear ratio.

[0026] Continuing with FIG. 1, accelerator pedal 130 is showncommunicating with the driver's foot 132. Accelerator pedal position(PP) is measured by pedal position sensor 134 and sent to controller 12.

[0027] In an alternative embodiment, where an electronically controlledthrottle is not used, an air bypass valve (not shown) can be installedto allow a controlled amount of air to bypass throttle plate 62. In thisalternative embodiment, the air bypass valve (not shown) receives acontrol signal (not shown) from controller 12.

[0028] Referring to FIGS. 2a and 2 b, an apparatus 210 is shown forcontrolling movement of a valve 212 in camless engine 10 between a fullyclosed position (shown in FIG. 2a), and a fully open position (shown inFIG. 2b). The apparatus 210 includes an electromagnetic valve actuator(EVA) 214 with upper and lower coils 216, 218 which electromagneticallydrive an armature 220 against the force of upper and lower springs 222,224 for controlling movement of the valve 212.

[0029] Switch-type position sensors 228, 230, and 232 are provided andinstalled so that they switch when the armature 220 crosses the sensorlocation. It is anticipated that switch-type position sensors can beeasily manufactured based on optical technology (e.g., LEDs and photoelements) and when combined with appropriate asynchronous circuitry theywould yield a signal with the rising edge when the armature crosses thesensor location. It is furthermore anticipated that these sensors wouldresult in cost reduction as compared to continuous position sensors, andwould be reliable.

[0030] Controller 234 (which can be combined into controller 12, or actas a separate controller) is operatively connected to the positionsensors 228, 230, and 232, and to the upper and lower coils 216, 218 inorder to control actuation and landing of the valve 212.

[0031] The first position sensor 228 is located around the middleposition between the coils 216, 218, the second sensor 230 is locatedclose to the lower coil 218, and the third sensor 232 is located closeto the upper coil 216.

[0032] As described above, engine 10, in one example, has anelectro-mechanical valve actuation (EVA) with the potential to maximizetorque over a broad range of engine speeds and substantially improvefuel efficiency. The increased fuel efficiency benefits are achieved byeliminating the throttle, and its associated pumping losses, (oroperating with the throttle substantially open) and by controlling theengine operating mode and/or displacement, through the direct control ofthe valve timing, duration, and or lift, on an event-by-event basis.

[0033] In one aspect of the invention, unlike throttle based torquecontrol, intake valve closing (IVC) timing is adjusted to achieve thedesired engine torque output. If the torque demand is low, the enginedemand for air is also low and IVC timing is adjusted to force theintake valve to close earlier. The inventors of the subject applicationhave recognized that at high engine speed and low torque demandconditions, the time available for opening and closing the intake valveas desired to deliver the demanded air charge may become excessivelysmall so that the actuators (that have a finite speed of response) canno longer provide it.

[0034] At these conditions wherein air charge control can be degradedwith early intake valve closing (EIVC), late intake valve closingstrategy (with valve closing past BDC (bottom dead center) in thecompression stroke) is employed. In the late intake valve closing (LIVC)mode, more charge is drawn in than needed and then the excess is pushedback into the intake manifold by upward piston motion. An example of howthe valve closing mode selection is accomplished is shown by the graphillustrated in FIG. 3. Further, a routine for controlling valve timingis described below with regard to FIG. 10 in order to overcome thisdisadvantage.

[0035] The inventors herein have further recognized a disadvantage whentransitioning between these two modes. Thus, the transition betweenearly intake valve closing (EIVC) operation and late intake valveclosing (LIVC) operation as may be required as a result of the drivertorque demand drop at high engine speeds can be difficult to manage.This difficulty is now described in detail below.

[0036] When the air-fuel charge starts to be pushed back into the intakemanifold from the cylinder, the air-to-fuel mixture supplied to thesubsequent cylinders is disturbed. Deviations in the exhaust air-fuelratio occur as a result and there can be a degraded impact on catalystperformance and tailpipe emissions. In other words, the air-fuel mixturepushed back into the intake manifold changes the air-fuel mixture to bedrawn into future cylinder events. This effect is illustrated in FIG. 4.

[0037] Specifically, FIG. 4 demonstrates the transient deviations in themeasured exhaust air-to-fuel ratio caused by transitions between EIVCand LIVC modes where in both modes the airflow and the injected fuelingrate remains the substantially constant.

[0038]FIG. 5 first describes an algorithm that estimates the effect offuel and residual pushback during LIVC mode. Generally, the algorithmkeeps track of the gaseous fuel and residuals mass in the intakemanifold and updates them as a result of pushback. Once the estimatorfor the pushback fuel and residuals mass is developed, a controller thatprovides transient compensation to minimize deviations in theair-to-fuel ratio from the desired value during the transition isspecified in FIG. 6. Additionally, the estimated ratio of residuals toair in-cylinder is used to correctly estimate MBT spark and enginetorque as required to ensure vehicle drivability and fuel efficientoperation.

[0039] The estimation algorithm of FIG. 5 updates the mass of gaseousfuel, residual gas, air and the mass of liquid fuel puddle onevent-to-event basis. The following notation is used for thesevariables: m_(f,Man)(k) mass (kg) of (pushed back gaseous) fuel inintake manifold at event k m_(r,Man)(k) mass (kg) of residual gas inintake manifold at event k m_(a,Man)(k) mass (kg) of air in intakemanifold at event k m_(p)(k) mass (kg) of fuel puddle in intake manifoldat event k

[0040] The input variables to the algorithm are:

[0041] W_(cyl)(k) flow rate of air (kg/sec) estimated by EVA enginecharge estimation function as a function of present valve timings andother engine operating parameters;

[0042] N(k) engine speed (measured);

[0043] W_(cyl,BDC)(k) flow rate of air (kg/sec) estimated by EVA enginecharge estimation function if intake valve closure (IVC) were at BottomDead Center (BDC). This may be also considered as a calibratablecorrection function.

[0044] W_(f,i)(k) injector fueling rate (kg/sec);

[0045] X(k),τ(k) wall-wetting fraction and time constant estimated bytransient fuel function as a function of present engine operatingconditions (engine speed, intake temperature, intake pressure).Transient fuel refers to an estimate of an amount of fuel injected intothe intake manifold but not inducted into the engine during a previousinjection event, due to its retention in the intake manifold, usually ina puddle in the intake manifold);

[0046] m_(f,cvp)(k) mass of fuel (kg) entering the cylinder due to fuelpurge, estimated by fuel purge function;

[0047] m_(r) ^(nom)(k) nominal mass of residuals per cylinder (kg) thatis due to overlap and exhaust valve closure timing, predicted on thebasis of a nominal model.

[0048] Referring now to FIG. 5, an example of the estimation algorithmis described. First, a determination is made in step 510 as to whetherthe current operating mode is EIVC or LIVC. If the answer to step 510 isthat the current mode is LIVC, then the following calculations anddeterminations are performed for Late Intake Valve Closure (LIVC) ChargeDelivery Mode, starting with step 512. First, in step 512, the routineestimates total mass in intake manifold according to equation 5.1.

m _(Man)(k)=m _(a,Man)(k)+m _(r,Man)(k)+m _(f,Man)(k)  Eqn. 5.1

[0049] Then, in step 514, the routine estimates, via equation 5.2 actualcharge per event entering and exiting the intake manifold, given thecurrent estimate of the cylinder flow. $\begin{matrix}{{C_{Cyl}(k)} = {{W_{cyl}(k)} \cdot {\frac{30}{N}.}}} & {{Eqn}.\quad 5.2}\end{matrix}$

[0050] Next, in step 516, the routine estimates, via equation 5.3,charge per event entering and exiting the intake manifold if IVC were atBDC, given the estimate of cylinder flow at BDC. $\begin{matrix}{{C_{{Cyl},{BDC}}(k)} = {{W_{{cyl},{BDC}}(k)} \cdot \frac{30}{N}}} & {{Eqn}.\quad 5.3}\end{matrix}$

[0051] Next, in step 518, the routine calculates total push-back chargemass in equation 5.4.

C _(pb)(k)=C _(Cyl,BDC)(k)−C _(Cyl)(k)  Eqn. 5.4

[0052] Then, in step 520, the routine estimate the amounts of“pushed-back” (gaseous) fuel, “pushed-back” residuals and air thatenters the cylinders at BDC from intake manifold in Eqns. 5.5-5.7.$\begin{matrix}\left\{ \begin{matrix}{{\Delta \quad {m_{f,{Man},{BDC}}(k)}} = {{C_{{cyl},{BDC}}(k)}\frac{m_{f,{Man}}(k)}{m_{Man}(k)}}} \\{{\Delta \quad {m_{r,{Man},{BDC}}(k)}} = {{C_{{cyl},{BDC}}(k)}\frac{m_{r,{Man}}(k)}{m_{Man}(k)}}} \\{{\Delta \quad {m_{a,{Man},{BDC}}(k)}} = {{C_{{cyl},{BDC}}(k)}\frac{m_{a,{Man}}(k)}{m_{Man}(k)}}}\end{matrix} \right. & {{{Eqns}.\quad 5.5}\text{-}5.7}\end{matrix}$

[0053] Then, in step 522, the routine estimates the amounts of fuel,residuals and air in cylinder at BDC. in Eqns. 5.8-5.12. In analternative embodiment, canister vapor purge fuel may also be accountedfor in the intake manifold state updates. $\quad\begin{matrix}\left\{ \begin{matrix}{\quad {{m_{f,{Cyl},{BDC}}(k)} = {{\Delta \quad {m_{f,{Man},{BDC}}(k)}} + {m_{f,{cvp}}(k)} + \left( {1 - {X(k)}} \right)}}} \\{\quad {{{W_{f,i}(k)}\frac{30}{N(k)}} + {\frac{m_{p}(k)}{\tau (k)}\frac{30}{N(k)}}}} \\{{m_{r,{Cyl},{BDC}}(k)} = {{\Delta \quad {m_{r,{Man},{BDC}}(k)}} + {m_{r,{cyl}}^{nom}(k)}}} \\{{m_{a,{Cyl},{BDC}}(k)} = {\Delta \quad {m_{a,{Man},{BDC}}(k)}}} \\{{m_{{Cyl},{BDC}}(k)} = {{m_{a,{Cyl},{BDC}}(k)} + {m_{r,{Cyl},{BDC}}(k)} + {m_{f,{Cyl},{BDC}}(k)}}}\end{matrix} \right. & {{{Eqns}.\quad 5.8}\text{-}5.12}\end{matrix}$

[0054] Next, at step 524, the routine estimates the amounts of pushedback fuel, residuals and air in Eqn2. 5.13 to 5.15. $\begin{matrix}\left\{ \begin{matrix}{{\Delta \quad {m_{f,{pb}}(k)}} = {{C_{pb}(k)}\frac{m_{f,{Cyl},{BDC}}(k)}{m_{{Cyl},{BDC}}(k)}}} \\{{\Delta \quad {m_{r,{pb}}(k)}} = {{C_{pb}(k)}\frac{m_{r,{Cyl},{BDC}}(k)}{m_{{Cyl},{BDC}}(k)}}} \\{{\Delta \quad {m_{a,{pb}}(k)}} = {{C_{pb}(k)}\frac{m_{a,{Cyl},{BDC}}(k)}{m_{{Cyl},{BDC}}(k)}}}\end{matrix} \right. & {{{Eqns}.\quad 5.13}\text{-}5.15}\end{matrix}$

[0055] Next, in step 526, the routine updates the intake manifold states(mass of gaseous fuel, residuals, air, and liquid fuel puddle)$\quad\begin{matrix}\left\{ \begin{matrix}{{m_{f,{Man}}\left( {k + 1} \right)} = {{m_{f,{Man}}(k)} - {\Delta \quad {m_{f,{Man},{BDC}}(k)}} + {\Delta \quad {m_{f,{PB}}(k)}}}} \\{{m_{r,{Man}}\left( {k + 1} \right)} = {{m_{r,{Man}}(k)} - {\Delta \quad {m_{r,{Man},{BDC}}(k)}} + {\Delta \quad {m_{r,{PB}}(k)}}}} \\{{m_{a,{Man}}\left( {k + 1} \right)} = {{m_{a,{Man}}(k)} - {\Delta \quad {m_{a,{Man},{BDC}}(k)}} +}} \\{\quad {{\Delta \quad {m_{a,{PB}}(k)}} + {C_{cyl}(k)}}} \\{{m_{p}\left( {k + 1} \right)} = {{m_{p}(k)} + {{X(k)} \cdot {W_{f,i}(k)} \cdot \frac{30}{N(k)}} - {\frac{m_{p}(k)}{\tau (k)} \cdot \frac{30}{N(k)}}}}\end{matrix} \right. & {{{Eqns}.\quad 5.16}\text{-}5.20}\end{matrix}$

[0056] When the answer to step 510 indicates Early Intake Valve Closure(EIVC) Charge Delivery Mode is being utilized, the routine continues tostep 530. First, in step 530, the routine estimates total mass in intakemanifold via equation 5.21.

m _(Man)(k)=m _(a,Man)(k)+m _(r,Man)(k)+m _(f,Man)(k)  Eqn. 5.21

[0057] Then, in step 532, the routine estimates actual charge per evententering and exiting the intake manifold, given the current estimate ofthe cylinder flow in equation 5.22. $\begin{matrix}{{C_{Cyl}(k)} = {{W_{cyl}(k)} \cdot {\frac{30}{N}.}}} & {{Eqn}.\quad 5.22}\end{matrix}$

[0058] Next, in step 534, the routine estimates the change in mass ofgaseous fuel, residuals and air in intake manifold as a result of chargebeing drawn into cylinder via equations 5.23-5.25. $\begin{matrix}\left\{ \begin{matrix}{{\Delta \quad {m_{f,{Man}}(k)}} = {{C_{Cyl}(k)}\frac{m_{f,{Man}}(k)}{m_{Man}(k)}}} \\{{\Delta \quad {m_{r,{Man}}(k)}} = {{C_{Cyl}(k)}\frac{m_{r,{Man}}(k)}{m_{Man}(k)}}} \\{{\Delta \quad {m_{a,{Man}}(k)}} = {{C_{Cyl}(k)}\frac{m_{a,{Man}}(k)}{m_{Man}(k)}}}\end{matrix} \right. & {{{Eqns}.\quad 5.23}\text{-}5.25}\end{matrix}$

[0059] Then, in step 536, the routine estimates the amounts of fuel,residuals and air in cylinder at IVC via equations 5.26-5.30. As above,canister vapor purge fuel contribution may be alternatively accountedfor in the intake manifold state updates. $\begin{matrix}\left\{ \begin{matrix}{\quad {{m_{f,{Cyl}}(k)} = {{\Delta \quad {m_{f,{Man}}(k)}} + {m_{f,{cvp}}(k)} + \left( {1 - {X(k)}} \right)}}} \\{\quad {{{W_{f,i}(k)}\frac{30}{N(k)}} + {\frac{m_{p}(k)}{\tau (k)}\frac{30}{N(k)}}}} \\{\quad {{m_{r,{Cyl}}(k)} = {{\Delta \quad {m_{r,{Man}}(k)}} + {m_{r,{cyl}}^{nom}(k)}}}} \\{\quad {{m_{a,{Cyl}}(k)} = {\Delta \quad {m_{a,{Man}}(k)}}}} \\{\quad {{m_{Cyl}(k)} = {{m_{a,{Cyl}}(k)} + {m_{r,{Cyl}}(k)} + {m_{f,{Cyl}}(k)}}}}\end{matrix} \right. & {{{Eqns}.\quad 5.26}\text{-}5.30}\end{matrix}$

[0060] Finally, in step 538, the routine updates intake manifold states(mass of gaseous fuel, residuals, air, and liquid fuel puddle) viaequations 5.31-5.34. $\quad\begin{matrix}\left\{ \begin{matrix}{{m_{f,{Man}}\left( {k + 1} \right)} = {{m_{f,{Man}}(k)} - {\Delta \quad {m_{f,{Man}}(k)}}}} \\{{m_{r,{Man}}\left( {k + 1} \right)} = {{m_{r,{Man}}(k)} - {\Delta \quad {m_{r,{Man}}(k)}}}} \\{{m_{a,{Man}}\left( {k + 1} \right)} = {{m_{a,{Man}}(k)} - {\Delta \quad {m_{a,{Man}}(k)}} + {C_{cyl}(k)}}} \\{{m_{p}\left( {k + 1} \right)} = {{m_{p}(k)} + {{X(k)} \cdot {W_{f,i}(k)} \cdot \frac{30}{N(k)}} - {\frac{m_{p}(k)}{\tau (k)} \cdot \frac{30}{N(k)}}}}\end{matrix} \right. & {{{Eqns}.\quad 5.31}\text{-}5.34}\end{matrix}$

[0061] In this way, it is possible to estimate the air, fuel, andresidual amounts in the intake manifold and entering the cylinders evenwhen the engine is operated in a plurality of valve closing modes,including early and late intake valve closing. Further, it is possibleto estimate air, fuel, and residual amounts during transient operatingconditions, including transitions between the two valve closing modes.

[0062]FIGS. 7-9 illustrate algorithm performance after appropriatetuning, which is depending on specific parameters of the engine and canbe obtained through experimental testing. Note that the estimatepredicts the exhaust air-fuel ratio deviations that occur whentransition between valve closing modes.

[0063] Referring now to FIG. 6, an air-fuel ratio controller isdescribed that can be used to advantage to reduce exhaust air-fuel ratiovariations when transitioning between valve timing modes. In generalterms, the routine calculates the required fuel injection based on adesired air fuel ratio and an estimate of the air, fuel, and residualsthat will enter the cylinder, depending on whether EIVC or LIVC isutilized. As described above, in one example the desired air-fuel ratiois approximately the stoichiometric value. Thus, during feedbackair-fuel ratio control, the air-fuel ratio is controlled to oscillateabout the stoichiometric value.

[0064] First, in step 610, the routine determines the desiredair-to-fuel ratio λ_(d) based on engine operating conditions, such astime since engine start, time between engine starts, engine coolanttemperature, and various other parameters. Then, in step 612, theroutine measures actual air-fuel ratio based on the UEGO signal. Notethat the routine can operate in either an open loop mode (i.e., withoutfeedback from the UEGO signal), or in closed loop control (i.e., withfeedback from the UEGO signal) depending on operating conditions.

[0065] Then, in step 614, a determination is made as to whether thecurrent operating mode is EIVC or LIVC. If the answer to step 614 isthat the current mode is LIVC, then the routine continues to step 616and, to maintain the desired air-to-fuel ratio λ_(d), the followingequation 6.1 determines the injected fueling rate: $\begin{matrix}{{W_{f,i}(k)} = \frac{\begin{matrix}\left( {\frac{\Delta \quad {m_{a,{Man},{BDC}}(k)}}{\lambda_{d}} - {\Delta \quad m_{f,{Man},{BDC}}(k)} -} \right. \\\left. {{m_{f,{cvp}}(k)} - {\frac{m_{p}(k)}{\tau (k)}\frac{30}{N(k)}}} \right)\end{matrix}}{\left( {1 - {X(k)}} \right)\frac{30}{N(k)}}} & {{Eqn}.\quad 6.1}\end{matrix}$

[0066] Alternatively, in step 618, for EIVC mode, to maintain a desiredair-to-fuel ratio λ_(d), the following equation 6.2 determines theinjected fueling rate. $\begin{matrix}{{W_{f,i}(k)} = \frac{\begin{matrix}\left( {\frac{\Delta \quad {m_{a,{Man}}(k)}}{\lambda_{d}} - {\Delta \quad m_{f,{Man}}(k)} -} \right. \\\left. {{m_{f,{cvp}}(k)} - {\frac{m_{p}(k)}{\tau (k)}\frac{30}{N(k)}}} \right)\end{matrix}}{\left( {1 - {X(k)}} \right)\frac{30}{N(k)}}} & {{Eqn}.\quad 6.2}\end{matrix}$

[0067] The fueling rate to be injected in the EIVC mode as calculatedfrom EQN. 6.2 may be negative. This means that the amount of pushed backfuel in the intake manifold is large and since it is not possible totake fuel in the intake manifold, this can result in a rich air-fuel iffuel is cut. As such, it may be necessary to completely stop fuelinjection in this case. I.e., if the fueling rate calculated from EQN.6.2 is negative, then the fueling rate is set to zero, and valve timingcontrol is employed to provide a stoichiometric air-to-fuel ratio.Specifically, if

W _(f,i)(k)=0

[0068] and the cylinder flow is equal to${C_{{cyl},d}(k)} = \frac{{m_{f,{cvp}}(k)} + {\frac{m_{p}(k)}{\tau (k)} \cdot \frac{30}{N(k)}}}{\lambda_{d} - \frac{m_{f,{man}}(k)}{m_{man}(k)}}$

[0069] then the in-cylinder air-to-fuel ratio is equal to the desiredvalue,${\lambda (k)} = {\frac{m_{a,{Cyl}}(k)}{m_{f,{Cyl}}(k)} = {\lambda_{d}.}}$

[0070] The desired cylinder flow is commanded to the valve timingcontroller which calculates an adjusted IVC timing required to maintaindesired A/F ratio:

IVC(k)=f ⁻¹(C _(cyl,d)(k))

[0071] Due to larger cylinder airflow, this can result in increasedtorque from the engine. To compensate for this potential torquedisturbance, the spark timing retard is set to cancel the torqueincrease, and thereby provide accurate air-fuel ratio control and torquecontrol even when significant disturbances are caused by changes fromEIVC to LIVC or vice versa.

[0072] Further, as indicated above, feedback correction based on UEGOsensor measurements can be added to the numerators of these expressions,if feedback correction is desired.

[0073] In this way, the routine takes account of the air and fuel pushedback into the intake manifold and then inducted into subsequent cylinderevents. Injected fuel is adjusted during the transition in valveoperating modes so that errors in air-fuel ratio from the desired valueare reduced. Thus, controller can adjust injected fuel to the cylindersbased on the transient effects of changing valve timing, including bytaking into account the air and/or fuel, pushed back into the intakemanifold and inducted in subsequent engine cylinders.

[0074] In yet another alternative embodiment, the routine can furtheraccount for residuals when correcting ignition timing. Here, thein-cylinder masses of air and residuals are estimated and their ratio(burnt gas fraction) is used as an input to MBT spark tables in step620.

[0075] Referring now to FIG. 7, data illustrates the results obtained byoperation according to various aspects of the present invention.Specifically, the top graph illustrates the air-fuel ratio obtained withand without compensation during transitions from EIVC to LIVC and fromLIVC to EIVC. Specifically, the middle graph shows when the transitionsoccur, and the bottom graph shows the adjustments made to injected fuelaccording to the compensation schemes described above. Further, thegraph illustrates at approximately 21 seconds that in this transition,even stopping fuel injection may not completely compensate for thepushback effect. As described above, addition adjustment of valve timing(e.g., airflow), can further improve response if desired.

[0076]FIGS. 8A-8C show more detailed data for 1500 RPM conditions. TheseFigures show how the predicted air-fuel ratio based on the aboveequations compares with measured air-fuel ratio data. Specifically, FIG.8A shows the close response between the model (dashed) and the data(solid). FIG. 8B shows the desired fuel pulse width that would begenerated to compensate for this disturbance according to the equationsdescribed above. Further, FIG. 8C shows internal model states. FIGS.8D-8F shows the same type of data for an engine speed of 2500 RPM.

[0077] Referring now to FIG. 9, additional results are shownillustrating model results at 1500 RPM showing that the mode can accountfor variations in both valve timing and changes in injected fuel.

[0078] Referring now to FIG. 10, a routine is described for determiningthe requested engine torque and engine airflow, and based thereon,controlling engine valve timing. First, in step 1010, the routinedetermines the driver request from signal (PP). For example, the routinedetermines a requested drive torque based on pedal position, andoptionally adjusted based on vehicle speed. Further, various otherdriver requests approaches can be used. From step 1010, the routinecontinues to step 1012, where a determination is made as to whether thevehicle is operating in a mode other than the driver request mode. Othersuch modes include, for example: a cruise control mode where vehiclespeed is used with a vehicle speed set point to control engineoperation, traction control, where wheel slip is used to control engineoutput, idle speed control where engine speed is feedback controlledindependent of driver input, or vehicle stability control. When theanswer to step 1012 is “yes”, the routine continues to step 1014 anddetermines the desired engine torque based on the other operating mode.

[0079] Alternatively, when the answer to step 1012 is “no”, the routinecontinues to step 1016 and determines the desired engine torque based onthe driver request in step 1010. For example, the routine can calculatedesired engine torque based on the desired wheel torque and otherparameters including gear ratio, and torque ratio across the torqueconverter. Then, the routine continues to step 1018 and determines thedesired airflow based on the desired engine torque. This can beperformed using engine maps including parameters such as engine speed,engine coolant temperature, air-fuel ratio, and various others.Alternatively, the routine can determine the desired air amount such asan air charge value based on the desired engine torque.

[0080] From step 1018 the routine continues to step 1020 to determinewhether the desired air flow is less than a first threshold A-1 andwhether engine speed is greater than a second threshold N-1. When theanswer to step 1020 is “yes”, the routine continues to step 1022 tooperate with intake valve closing timing after bottom dead center ofpiston movement. Alternatively, when the answer to step 1020 is “yes”the routine continues to step 1024 to operate with valve closing timingof the intake valve before bottom dead center of piston movement. Notethat the operation according to steps 1022 and 1024 can be referred toas late intake valve closing and early intake valve closing depending onwhether the intake valve closing timing is before or after bottom deadcenter of the piston movement during the intake stroke. Finally, in step1026, the routine controls valve timing (either early or late) toprovide the desired air amount, and to thereby provide the desiredengine torque and finally thereby to provide the desired driver request.

[0081] Note that the invention is also applicable to other types ofvariable valve systems, with either variable valve lift or variablevalve timing. One such example system is described below with regard toFIG. 11A, which shows a variable cam timing (VCT) system. Any suitableVCT mechanism can be used. For example, the VCT system can be a dualequal system where both intake and exhaust valves are adjusted equallyvia a common camshaft. Alternatively, only intake cam timing or exhaustcam timing can be utilized.

[0082]FIG. 1 shows a block diagram of an engine utilizing a variable camtiming system. This embodiment includes an engine 10 having a particularvariable cam timing mechanism to provide valve-timing control. However,as stated above, the present invention is equally applicable to othertypes of variable cam timing (VCT) engines in addition to camlessengines and variable valve timing engines.

[0083] The direct injection internal combustion engine 10 includes aplurality of combustion chambers or cylinders 12 having combustionchamber walls 14 with piston 16 positioned therein. Each piston 16 iscoupled via a connecting rod 18 to crankshaft 20. Combustion chamber, orcylinder, 12 is shown communicating with intake manifold 22 and exhaustmanifold 24 via respective intake valves 26 and exhaust valves 28. Fuelinjector 30 is shown directly coupled to combustion chamber 12 fordirectly injecting fuel into cylinder 12 in one or more injections orevents based on the pulse width of signal fpw generated by electronicengine controller 32 and conditioned or processed by conventionalelectronic driver 34.

[0084] Intake manifold 22 includes a throttle body assembly 36 having athrottle plate or valve 38 which may be used to modulate air flowthrough intake manifold 22. In this particular example, throttle plate38 is coupled to electric motor 40 which receives control signals fromcontroller 32 to position throttle plate 38 within intake manifold 22.The position of throttle plate 38 is monitored by an appropriatethrottle position sensor 42 which provides a throttle position (TP)signal to controller 32. Closed-loop feedback control of the position ofthrottle plate 38 is performed by controller 32 to control airflowthrough intake manifold 22 and into cylinders 12. This configuration iscommonly referred to as an electronic throttle control (ETC) ordrive-by-wire system because there is no mechanical linkage between thedriver's foot pedal and the throttle valve.

[0085] Exhaust gas oxygen sensor 44 is shown coupled to exhaust manifold24 upstream of catalytic converter 46. In this particular example,sensor 44 provides a corresponding signal (EGO) to controller 32 whichis then converted into an associated two-state signal (EGOS) used inclosed loop lambda control. A high voltage state of signal EGOSindicates exhaust gases are rich of stoichiometry and a low voltagestate of signal EGOS indicates exhaust gases are lean of stoichiometry.Various other types of exhaust gas sensors may also be used and havevarious advantages and trade-offs as well known by those of skill in theart.

[0086] Controller 32 controls operation of engine 10 and selects anappropriate operating mode for current operating conditions and driverdemand. For example, in the case of a DISI engine, stratified orhomogeneous operation can be selected. In a port fuel injected case,stoichiometric, rich, or lean operation can be selected.

[0087] To further reduce tailpipe emissions, a second three way catalyst(emission control device 52) may be used and is typically positioneddownstream of catalytic converter 46. Device 52 absorbs the NOx producedwhen engine 10 is operating lean of stoichiometry. Device 52 can then beperiodically purged or regenerated to maintain its effectiveness. Duringa purge cycle, engine 10 is operated in a rich or stoichiometrichomogeneous mode such to increase reductants (such as HC and CO) in thefeedgas passing through LNT 52. The excess HC and CO reacts with thestored NOx to purge or regenerate device 52.

[0088] Engine controller 32 is shown in FIG. 1 as a conventionalmicrocomputer including a microprocessor unit 60 in communication withvarious computer readable storage media, indicated generally byreference numeral 62, via a data and address bus. Computer readablestorage media 62 preferably include physical memory devices such asread-only memory (ROM) 64, random-access memory 66, and the like capableof storing data representing executable instructions and calibrationinformation used by microprocessor 60 to control engine 10. Computerreadable storage media 62 may include various other types of temporaryor persistent memory or storage such as EPROM, EEPROM, flash, or anyother type of magnetic, optical, or combination devices capable of datastorage. Controller 32 also includes various input/output ports 68 whichmay provide signal conditioning, detection, scaling, short circuitprotection, and the like, to communication with various sensors andactuators in controlling engine 10.

[0089] In operation, controller 32 receives signals from various sensorspreferably including a mass air flow sensor (MAF) 70, a manifoldpressure sensor (MAP) 72, a catalyst temperature sensor (Tcat1) 74, anLNT temperature sensor (Tcat2) 76, an engine coolant temperature sensor(ECT) 78, a and a crankshaft position sensor 80, for example. An enginespeed signal (RPM) is generated by controller 32 from an ignitionprofile signal (PIP) generated by crankshaft position sensor 80 inresponse to rotation of crankshaft 20.

[0090] Continuing with FIG. 1, camshaft 90 of engine 10 is showncommunicating with rocker arms 92 and 94 for actuating intake valves 26and exhaust valves 28 to control the air charge entering cylinder 12 andthe exhaust gases exiting cylinder 12. Camshaft 90 is directly coupledto housing 96. Housing 96 forms a toothed wheel having a plurality ofteeth 98. Housing 96 is hydraulically coupled to an inner shaft (notshown), which is in turn directly linked to camshaft 90 via a timingchain (not shown). As such, housing 96 and camshaft 90 rotate at a speedsubstantially equivalent to the inner camshaft. The inner camshaftrotates at a constant speed ratio relative to crankshaft 20.

[0091] Variable cam timing is provided by manipulation of the hydrauliccoupling to change the relative position of camshaft 90 to crankshaft20. The hydraulic coupling is manipulated by varying hydraulic pressuresin advance chamber 100 and retard chamber 102. Controller 32 sendscontrol signals (LACT,RACT) to conventional solenoid valves (not shown)to control the flow of hydraulic fluid either into advance chamber 100,retard chamber 102, or neither. By allowing high pressure hydraulicfluid to enter advance chamber 100, the relative relationship betweencamshaft 90 and crankshaft 20 is advanced. Thus, intake valves 26 andexhaust valves 28 open and close at a time earlier than normal relativeto crankshaft 20. Similarly, by allowing high pressure hydraulic fluidto enter retard chamber 102, the relative relationship between camshaft90 and crankshaft 20 is retarded. Thus, intake valves 26 and exhaustvalves 28 open and close at a time later than normal relative tocrankshaft 20.

[0092] Teeth 98, being coupled to housing 96 and camshaft 90, allow formeasurement of relative cam position via cam timing sensor 104 byproviding a signal (VCT) to controller 32. Teeth 98 preferably includeequally spaced teeth 106, 108, 110, and 112 which can be used formeasurement of cam timing, in addition to a tooth 114 preferably usedfor cylinder identification.

[0093] An alternative embodiment is now described for using pushbackestimation to account for air-fuel ratio errors due to variations in camtiming of the cam timing system described above with regard to FIG. 11A.Specifically, referring now to FIG. 11B, a routine is described foradjusting fuel injection based on pushback estimation. This routine isexecuted at engine firing events, rather than at a fixed sample time.

[0094] First, in step 1110, the routine reads various parameters of theengine and valve system. These parameters include the valve openingduration (DURATION), the nominal intake valve opening (IVO), the maximumvolume (VMAX, engine displacement plus clearance volume), regressionparameters (INT, LIN, and SQR, described below with regard to FIGS. 12Aand 12B.

[0095] Then, in step 1112, the routine calculates the current intakevalve closing angle (ivc) based on the measured cam angle (cam_act) asshown below in equation 11.1.

ivc=cam _(—) act−IVO+DURATION−180  EQN 11.1

[0096] Next, in step 1114, the routine calculates the cylinder volume atintake valve closing (volume_ivc) according to equation 11.2.

volume_(—) ivc=INT+LIN*ivc+SQR*ivc 2   EQN 11.2

[0097] The terms INT, LIN, and SQR are obtained by regressing the sweptvolume versus intake valve closing timing, in the region of adjustment,as shown below in FIGS. 12A and 12B. FIG. 12A shows the variation acrossall valve closing, whereas FIG. 12B shows the region of actual valveadjustment for the particular dual equal VCT example.

[0098] Next, in step 1116, the routine calculates the charge pused outof the cylinder and into the intake manifold (pushback_chg) based oncylinder volume at intake valve closing as shown in equation 11.3 below.

pushback_chg=((VMAX−volume_(—) ivc)/VMAX)*archg*pushback_(—) n _(—)mul  EQN 11.3

[0099] where airchg is the estimated air charge in the cylinder(determine from the mass air flow sensor and engine speed), andpushback_n_mul is a multiplier determined as a function of engine speed,which can be done at a rate slower than the execution of FIG. 11.

[0100] Then, in step 1118, the routine calculates the change in chargepushback based on the calculated charge in step 1116 and calculatedcharge from the previous pushback charge of that cylinder as shown inequation 11.4.

del_pushback_chg=pushback_chg(i)−pushback_chg(i−8)  EQN 11.4

[0101] Note that the index (i) here is for each cylinder event. As such,(i−8) is for the case of an 8 cylinder engine. If a four cylinder enginewere used, then a value of 4 would be used in place of 8 in equation11.4.

[0102] Next, in step 1120, the routine calculates the air-fuel effect(AF_equiv) of a change in charge pushback as shown in equation 11.5.

AF_equiv=(airch+del_pushback_chg)/airchg*NOMAF  EQN 11.5

[0103] where NOMAF is a nominal air-fuel ratio value, such asstoichiometry.

[0104] Then, in step 1122, the routine calculates a fuel adjustmentamount (del_fuel_pushback) to compensate for air-fuel effects ofpushback charge caused by varying the valve timing as shown in equation11.6.

del_fuel_pushback=del_pushback_chg/(lambse _(—) des*14.6)  EQN 11.6

[0105] where lambse_des is a desired air-fuel ratio determined based onengine operating conditions. Specifically, lambse_des is a controloutput of a feedback air-fuel ratio control system that adjusts injectedfuel to maintain a desired air-fuel ratio based on exhaust gas oxygensensors located in the engine's exhaust.

[0106] Finally, in step 1124, the routine adjusts fuel injected into theengine based on the fuel adjustment determined in step 1122.

[0107] While FIG. 11 shows a high-level flowchart, in an alternativeembodiment, the following detailed code can also be used. This algorithmadvantageously uses various arrays updated at different rates tooptimize controller speed. Specifically, the algorithm uses a FIFO(First in first out) array with length of NUMCYL_(—)0 (number ofcylinders of the engine 10), to compensate for differences inpushed-back air/fuel mixture during a rapid VCT transition. Cell #0 ofthe array is updated at PIP edges (rising and/or falling) determinedfrom the crank sensor. There is a complete PIP wave for each cylinderfiring. The remainder of the array elements are pushed down one position(effectively discarding cell #[NUMCYL-1]). Each element of the FIFOarray represents the differences in pushed-back fuel mass between thecurrent cylinder event and N-th before.

[0108] At the same PIP edge, the fuelling calculation feature is alreadycalculating a desired fuel mass (mf_cyl) for each injector based on theexhaust air-fuel ratio sensors and the mass air flow sensor. Elements ofthe FIFO array are added to each mf_cyl according to engine firingorder. The additional compensation for push-back effects is not utilizeduntil the engine exits cranking during a start.

[0109] This algorithm thus accounts for the magnitude of push-backphenomenon, however, the additional compensation may not take place inthe cylinder where the error is created, but in subsequent cylinders,thereby obtaining an overall average reduction in air-fuel ratio errors.In other words, due to the time limitations for calculating andinjecting fuel, compensation may occur in a subsequent cylinder tocorrect air-fuel errors that are estimated in a previous cylinder.

[0110] The algorithm uses the following calibration parameters

[0111] FUL_IVO: Intake valve open duration at zero VCT (deg.).

[0112] initial value=225+7.5=232.5

[0113] ENG_VMAX: Maximum engine volume including both displacement andclearance (L).

[0114] initial value=5.94

[0115] FNFUL_PB_MUL(engine_speed): Push-back fuel mass multiplier forengine speed.

[0116] initial value=1, length 6, updated at a rate of 50 ms

[0117] FUL_PB_COE[3]: Coefficients for the quadratic cylinder volumeregression equation.

[0118] FUL_PB_COE[0]=−6.8177

[0119] FUL_PB_COE[1]=0.13107

[0120] FUL_PB_COE[2]=−0.0003376

[0121] PB_CYL_EVNT: Number of cylinder events to look back whendetermining the differences in pushed-back fuel mass.

[0122] initial value=8 (same as NUMCYL_(—)0, however, a different valuecan be used based on engine test results. For example, a smaller numberor a larger number could be used with a maximum value of, for example,12 for an 8-cylinder engine).

[0123] The following are RAM Parameters: ful_ivc: Actual intake closingangle (deg.). eng_vol_ivc: Engine volume at ful_ivc (L). mf_pb[12]:Pushed-back fuel mass at each cylinder event (lb.). mf_pb_del[13]:Differences in pushed-back fuel mass between cylinder events (lb.).ful_pb_mul: Push-back fuel mass multiplier. eng_vol_rt: Volume push-backratio. f_a_ave: Average f_a_ratio between two banks.

[0124] The following is a summary of the algorithm computations and codeutilized. The code in section (1) is updated at a rate of 50 ms. Thecode in section (2) is updated at the same rate as the variable camtiming feedback position controller/ or cam angle measurement, which is,for example, 16 ms. Section (3) shows the PIP task fuel calculation, andSection (4) shows the foreground fuel calculation.

[0125] (1) /* 50 ms task */

ful _(—) pb _(—) mul=lookup_(—)2d(&fnful _(—) pb _(—) mul,engine_speed);

f _(—) a_ave=(f _(—) a_ratio[0]+f _(—) a_ratio[1])/2.0;

[0126] Section (1) calculates the pushback multiplier calibration value(ful_pb_mul) which is a function of engine speed of the operatingengine. Further, this section calculates the average fuel-air ratio ofthe two cylinder banks, in the case where a two-bank engine is utilized.Of course, however, a single bank engine, or a multi-bank engine can beused.

[0127] (2) /* Same task rate as VCT update, currently 16 ms. */

ful _(—) ivc=cam _(—) act+FUL _(—) IVO;

eng _(—) vol _(—) ivc=FUL _(—) PB _(—) COE[0]+FUL _(—) PB _(—)COE[1]*ful _(—) ivc+FUL _(—) PB _(—) COE[2]*ful _(—) ivc*ful _(—) ivc;

eng _(—) vol _(—) rt=(ENG _(—) VMAX−eng _(—) vol _(—) ivc)/ENG_(—) VMAX;

[0128] Section (2) provides an estimate of the engine volume whichaccounts for variation in the intake valve closing timing. This sectionutilizes the estimated regression data illustrated in FIGS. 12A and 12B. (3)  /* PIP task. */  for (i = 1; i <= PB_CYL_EVNT; i++)  { mf_pb[PB_CYL_EVENT-i] = mf_pb[PB_CYL_EVENT-i-1];  }  mf_pb[0] =cyl_air_chg * f_a_ave * eng_vol_rt * ful_pb_mul;  for (i =1; i <NUMCYL_0; i++)  {  mf_pb_del[PB_CYL_EVENT -i] = mf_pb_del[PB_CYL_EVENT -i-1]  }  mf_pb_del[0] = mf_pb[0] - mf_pb[PB_CYL_EVNT]; wherePB_CYL_EVENT is the pushback cylinder event.

[0129] Section (3) provides the cylinder by cylinder estimate of theamount of push back fuel that is inducted in the current cylinder basedon the push back fuel pushed into the intake manifold from previouscylinders. In this way, the change in push back fuel caused by thechange in valve timing can be compensated by adjusting fuel injectioninto the engine. Specifically, the routine uses the estimated cylindervolume, average fuel-air ratio, and cylinder charge amount to estimatethe pushed back fuel (mf_pb). Then, a difference in push back fuel(mf_pb_del) can be determined. (4)   /* fuelling calculation feature −PIP task. */ fuel_bk = f_a_ratio * cyl_air_chg + pcomp_lbm; for (i =1; i< NUMCYL_0; i++) { mf_cyl[i] = fuel_bk + mf_tfc[i]; mf_cyl[i] =mf_cyl[i] + mf_pb_del[i]; mf_cyl[i] = f32max(mf_cyl[i], 0.0); }

[0130] Finally, Section (4) shows an algorithm for adjusting theinjected fuel request (mf_cyl) which accounts for the pushback fuel(mf_pb_del), fueling dynamics and wall wetting in the intake manifold(mf_tfc), fuel vapor purge (pcomp_lbm). These are all utilized with anestimate of the estimated cylinder charge (cyl_air_chg) and modifiedfuel air ratio (f_a_ratio, accounting for feedback from the exhaust gasoxygen sensors) to calculated the injected fuel.

[0131] Note that this algorithm can be modified to account for variousother factors. For example, during injector cut-out, it can be disabledto prevent injecting fuel due to push-back effects.

[0132] The air-fuel adjustment made (af_equiv), according to the routineof FIG. 11, is shown for experimental data in FIG. 13. Specifically, theadjustment value is shown to correlate with the air-fuel ratiodeviations (afr_r and afr_l), but at an early enough time that fuelinjection compensation can be made.

[0133]FIGS. 14A and 14B show before an after results according to thisembodiment. The graphs show cam angle variations at the maximum slewrate, along with measured air-fuel deviations. FIG. 14A shows operationwithout compensation, and FIG. 14B shows operation with compensation.The results with compensation show a considerably reduced air-fuel ratioerror.

[0134] In still another alternative embodiment, the amount of pushbackis not set proportional to the amount of air charge (as is used above),but rather determined as follows. Specifically, the amount of pushedback medium increases with decreasing air charge at late intake valveclosing, for example.

[0135] A further correction to the example described above with regardto FIGS. 11-14 is shown for the case where pushback_n_mul=1, forexample, (which holds for low engine speeds) and assuming thein-cylinder pressure during the part of the compression stroke beforeIVC is approximately equal to MAP. The air_chg can be written as

air_chg=(MAP/RT)*V _(—) ivc*(1−d−1/AF_ratio)

[0136] where d is the percent dilution in the cylinder. This can be apercentage of residual dilution, or a ratio of dilution, for example.Under the above assumptions, and using the pushback model previouslydescribed, the amount of air pushed back is:

pushback_chg_new=(MAP/RT)*(V_max−V _(—) ivc)*(1−d−1/AF_ratio)=((V_max−V_(—) ivc)/V _(—) ivc)*air_(—) chg

[0137] This compares to the previous expression:

pushback_chg=((V_max−V_(—) ivc)/V_max)*air_(—) chg

[0138] Note that the pushback_chg_new is larger that the pushback_chg bya factor V_max/V_ivc. At the nominal IVC of 60 deg ABDC (after bottomdead center), this is approximately equal to 1.3 for one example engine.In another case, it is 1.22. More importantly, the effects of a deltachange in V_ivc on pushback is multiplied by(V_max/V_ivc)^({circumflex over ( )})2 which is equal to 1.8 (or 1.5 ifthe other case) when delta's are taken around IVC=60, for the exampleengine.

[0139] That is,

delta pushback_chg_new/delta V _(—) ivc=1.8*(delta pushback_chg/delta V_(—) ivc).

[0140] In this way, further accuracy can be obtained.

We claim:
 1. An electronically controlled system, comprising: a computerstorage medium having a computer program encoded therein for controllingfuel injected into an internal combustion engine having an intakemanifold, said computer storage medium comprising: code for determiningan amount of a medium exhausted into said intake manifold from aprevious cylinder event of said engine; and code for adjusting fuelinjected for a later cylinder event based on said determined amount ofmedium.
 2. The system of claim 1 wherein said medium is air.
 3. Thesystem of claim 1 wherein said medium is fuel.
 4. The system of claim 1wherein said medium is burnt residual gas.
 5. The system of claim 1wherein said medium is an air-fuel mixture.
 6. The system of claim 1wherein said previous cylinder event occurred when the engine operatedin at least a first mode with intake valve closing before bottom deadcenter, and said later cylinder event occurred when the engine operatedin a second mode with intake valve closing after bottom dead center. 7.The system of claim 6 wherein said engine operates with an air-fuelratio oscillating about stoichiometry.
 8. The system of claim 7 furthercomprising a three-way catalyst.
 9. The system of claim 8 furthercomprising an oxygen sensor.
 10. The system of claim 1 furthercomprising code for further adjusting said injected fuel based on saidoxygen sensor.
 11. The system of claim 1 further comprising: code foradjusting air injected for a later cylinder event based on saiddetermined amount of medium; and code for adjusting spark timing for alater cylinder event based on said determined amount of medium.
 12. Anelectronically controlled system, comprising: a computer storage mediumhaving a computer program encoded therein for controlling fuel injectedinto an internal combustion engine having an intake manifold, the engineoperating in at least a first and second mode, said first mode includingoperating with intake valve closing before bottom dead center and saidsecond mode including operating with intake valve closing after bottomdead center, said computer storage medium comprising: code fordetermining an amount of a medium exhausted into said intake manifoldfrom a previous cylinder event of said engine occurring during saidfirst mode; and code for adjusting fuel injected for a later cylinderevent occurring during said second mode based on said determined amountof medium.
 13. The system of claim 12 wherein said medium is air. 14.The system of claim 12 wherein said medium is fuel.
 15. The system ofclaim 12 wherein said medium an air-fuel mixture.
 16. The system ofclaim 12 further comprising: code for adjusting air injected for a latercylinder event based on said determined amount of medium; and code foradjusting spark timing for a later cylinder event based on saiddetermined amount of medium.
 17. A system for an engine comprising: anelectronically controlled valve coupled in a cylinder of the engine; acontroller adjusting an opening and closing timing of said valve, saidcontroller also calculating a desired air amount, determining whethersaid desired air amount has decreased below a preselected amount, andtransitioning said valve from closing before bottom dead center ofpiston movement to valve closing timing after bottom dead center ofpiston movement in response to said determination.
 18. The system ofclaim 17 wherein said controller determines said desired air amountbased on a driver command signal.
 19. The system of claim 17 whereinsaid controller determines whether said desired air amount has decreasedbelow said preselected amount when engine speed is above a preselectedvalue.
 20. The system of claim 19 wherein said controller furtheradjusting valve closing timing to provide said desired air amount.
 21. Asystem for an engine comprising: an electronically controlled valvecoupled in a cylinder of the engine; a controller adjusting an openingand closing timing of said valve, said controller transitioning saidvalve from closing before bottom dead center of piston movement to valveclosing timing after bottom dead center of piston movement, or fromvalve closing timing after bottom dead center of piston movement toclosing before bottom dead center of piston movement to, in response tooperating conditions, and discontinuing fuel injection to at least onecylinder in response to said transition.
 22. A method for controlling anengine having an intake manifold and adjustable intake valve closingtiming, the method comprising: adjusting valve closing timing; andadjusting fuel injection to a subsequent cylinder to compensate for achange in an amount of air and fuel pushed into the intake manifold froma previous cylinder, said fuel adjustment maintaining air-fuel ratio ata desired level.
 23. An electronically controlled system, comprising: anactuator for adjusting valve timing; a controller having a computerstorage medium with a computer program encoded therein for adjustingfuel injected into an internal combustion engine with a manifold, saidmedium comprising: code for determining valve timing; code fordetermining an amount of a medium exhausted into said intake manifoldbased on said determined valve timing; and code for adjusting fuelinjected into the engine based on said determined amount of medium. 24.The system of claim 23, wherein said actuator adjusts cam timing of acam thereby adjusting valve timing.
 25. The system of claim 24 whereinsaid cam adjusts intake valve closing timing.
 26. The system of claim 23wherein said actuator adjusts both intake valve timing and exhaust valvetiming equally.
 27. The system of claim 23 further comprising code forsending a signal to said actuator to change said valve timing.
 28. Thesystem of claim 23 wherein said code for adjusting fuel injected intothe engine further includes code for adjusting fuel injected into theengine based on said determined amount of medium and an amount of fuelinjected into the intake manifold but not inducted into the engineduring a previous injection event.
 29. The system of claim 23 furthercomprising code for determining said amount of medium exhausted intosaid intake manifold based on an estimated cylinder volume at intakevalve closing.
 30. A method for controlling an engine having an intakemanifold and adjustable intake valve closing timing, the methodcomprising: adjusting valve closing timing between before bottom deadcenter of piston movement and after bottom dead center of pistonmovement while maintaining engine output torque; and in response to saidvalve timing adjustment, adjusting fuel injection to maintain air-fuelratio at a desired level.
 31. An electronically controlled system,comprising: an actuator for adjusting intake valve closing timing; acontroller having a computer storage medium with a computer programencoded therein for adjusting fuel injected into an internal combustionengine with a manifold, said medium comprising: code for determiningvalve timing; code for determining an amount of a gas medium exhaustedinto said intake manifold based on said determined valve timing and anamount of dilution in the cylinder; and code for adjusting fuel injectedinto the engine based on said determined amount of medium.